<template>
    <BaseContainer>
        <div class="tong_ji">
            <div>
                <h3 style="margin-bottom: 20px;">一站办站点数据</h3>
                <span style="margin-right:80px">日活数据： {{ countData.dayCount }} 人</span>
                <span>月活数据： {{ countData.monthCount }} 人</span>
            </div>
            <div>
                <h3 style="margin-bottom: 20px;">智慧民政</h3>
                <span style="margin-right:80px">日调用次数： {{ ueixAahtData.dayCount }} 次</span>
                <span>月调用次数： {{ ueixAahtData.monthCount }} 次</span>
            </div>
            <div>
                <h3 style="margin-bottom: 20px;">我的南京</h3>
                <span style="margin-right:80px">日调用次数： {{ myNanJing.dayCount }} 次</span>
                <span>月调用次数： {{ myNanJing.monthCount }} 次</span>
            </div>
        </div>
        <el-divider />
        <h3 style="margin-top: 20px;">管理后台留痕查询</h3>
        <aplid-base-crud ref="crud" class="w-100" v-bind="baseConfig">
        </aplid-base-crud>
    </BaseContainer>
</template>

<script setup lang="ts">
import {baseConfig} from './config'
import { ref, nextTick} from 'vue'
import apiMod from '@/apiMod/index'

// 获取日活月活数据
let countData:any = ref({
    dayCount:0,
    monthCount:0
})
// 智慧民政
let ueixAahtData:any = ref({
    dayCount:0,
    monthCount:0,
})
let myNanJing:any = ref({
    dayCount:0,
    monthCount:0,
})
const getCount = async() =>{
    // 一站办
    let res1 =await apiMod.sys_log_countDayAndMonth({serviceId:'id_card',countType:2})
    countData.value = res1.data
    // 智慧民政
    let res2 =await  apiMod.sys_log_countDayAndMonth({serviceId:'ueixAaht',countType:1})
    ueixAahtData.value = res2.data
    // 我的南京
    let res3 =await  apiMod.sys_log_countDayAndMonth({serviceId:'id_card',countType:1})
    myNanJing.value = res3.data
}
getCount()

let crud = ref()

</script>
<style scoped lang="scss">
.tong_ji{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}
</style>